<!DOCTYPE html>

<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>测试global对象(实例)</title>
    </head>
    <body>

        <script>
            var username = 'zhangsanfeng' ;
            console.log( username );

            console.log( window.username );
            console.log( this.username );
            console.log( globalThis.username );

            console.log( '- - - '.repeat(10) );

            console.log( window === this );
            console.log( window === globalThis );
        </script>
        
    </body>
</html>